package com.cuput.partybuilding.contact.comparator;

import com.cuput.partybuilding.contact.bean.Contact;

import java.util.Comparator;

/**
 * Created by wei on 2017-05-17.
 * 联系人名称排序
 */

public class ContactNameCompare implements Comparator<Contact> {
    @Override
    public int compare(Contact lhs, Contact rhs) {
        String lTemp = lhs.getPinyin() == null ? "" : lhs.getPinyin();
        String rTemp = rhs.getPinyin() == null ? "" : rhs.getPinyin();
        return lTemp.compareTo(rTemp);
    }
}
